<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.yaodian100.com/jsp/yaodian100" prefix="yaodian100" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page import="com.yaodian100.core.common.utils.ServerValue"%>
<%@page import="java.util.List"%>
<%@page import="com.yaodian100.ec.announcement.entity.Announcement"%>
<%@page import="org.apache.commons.lang.xwork.StringUtils"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<c-rt:set var="midContextPath" value='<%=ServerValue.getMidContextPath() %>'/>
<head>
<style type="text/css">
h1 span{visibility:visible;}
</style>
</head>
<script>
function popitup(url) {
	var winl = (screen.width-600)/2;
	var wint = (screen.height-500)/2;
	newwindow=window.open(url,'name','top='+wint+',left='+winl+',height=500,width=600,scrollbars=yes');
}
</script>
<%
@SuppressWarnings("unchecked")
List<Announcement> annList = (List)request.getAttribute("annList");
Announcement ann;
%>
<br />
<h1>中台公告</h1>
<br />
<table class="tb-1"  width="800">
	<thead>
		<tr class="tb-data-F">
			<th width="800">标题</th>
		</tr>
	</thead>
	<tbody>
		<%
		for(int i = 0 ; i < annList.size() ; i++){ 
			ann = annList.get(i);
		%>
			<tr class="tb-data <%=i%2==0?"bg-yl":"" %>">
			<td align="left">【<%=ann.getTypeName()%>】﹣
				<%if (StringUtils.isNotBlank(ann.getTargetURL())) {%><a href='<%=ann.getTargetURL()%>' target='_blank'><%=ann.getSubject() %></a>
		    <% } else {%><a href="javascript:void(0);" onclick="popitup('${midContextPath}/announcement/viewIntranet.do?annId=<%=ann.getId()%>')"><%=ann.getSubject() %></a>
			  <%} %></td>
			</tr>
		<%} %>
	</tbody>
</table>
<yaodian100:pageutil link="${midContextPath}/announcement/searchIntranet.do" pagerObj="${pager}" />